var mutations = {
  setUserInfo(state, userInfo) {
    state.userInfo = userInfo;
  },
  SET_USER_CAR_START_ADDRESS (state, address) {
    state.userCarState.startAddress = address;
    state.userCarState.callCarParams.startAddress = Object.assign(state.userCarState.callCarParams.startAddress, address)
  },
  SET_USER_CAR_END_ADDRESS (state, address) {
    state.userCarState.callCarParams.endAddress = Object.assign(state.userCarState.callCarParams.endAddress, address)
  },
  SET_USER_CAR_TIME (state, time) {
    state.userCarState.callCarParams.carUserTime = time
  },
  SET_USER_CAR_PRODUCT_ID (state, id) {
    state.userCarState.callCarParams.productId = id
  },
  SET_USER_CAR_TYPE (state, type) {
    state.userCarState.callCarParams.type = type
  },
  // 设置创建订单生成的数据
  SET_CREATED_ORDER_DATA (state, data) {
    state.userCarState.created_order = data
  },
  // 设置状态机中费用归属数据
  SET_COMMON_COST_ATTRIBUTION (state, data) {
    state.common.cost_attribution = data
  },
  // 设置状态机中部门初始数据
  SET_COMMON_ATTRIBUTION (state, data) {
    state.common.attribution_data = data
  },
  // 设置状态机中费用归属选中值
  SET_COST_SELECTED_VALUE (state, data) {
    state.common.cost_selected = data
  },
  // 设置差旅计划预计费用
  SET_TRAVEL_PLAN_MONEY (state, data) {
    state.traveldata.travelmoney.reckonMoney = data
  },
  SET_SHOW_TARGET_ADDRESS (state, target) {
    state.userCarState.searchAddress.isOpenCityName = false;
    state.userCarState.searchAddress.isOpenHistoryAddress = false;
    state.userCarState.searchAddress.isOpenRemoteAddress = false;
    state.userCarState.searchAddress[target] = true;
  },
  SET_SEARCH_CITY_NAME_TEXT (state, text) {
    state.userCarState.searchAddress.searchCityNameText = text
  },
  SET_SEARCH_ADDRESS_TEXT (state, text) {
    state.userCarState.searchAddress.searchAddressText = text
  },
  SET_COMMON_ADDRESS_HOME (state, obj) {
    storejs.set('SET_COMMON_ADDRESS_HOME', obj);
    state.userCarState.searchAddress.commonHome = obj
  },
  SET_COMMON_ADDRESS_COMPANY (state, obj) {
    storejs.set('SET_COMMON_ADDRESS_COMPANY', obj);
    state.userCarState.searchAddress.commonCompany = obj
  },
  SET_COMMON_ADDRESS_HOME_STATE (state, bol) {
    state.userCarState.searchAddress.isEditCommonHome = bol
  },
  SET_COMMON_ADDRESS_COMPANY_STATE (state, bol) {
    state.userCarState.searchAddress.isEditCommonCompany = bol
  },
  SET_GEOLOCALTION_STATE (state, type) {
    state.userCarState.geolocaltion = type
  },
  SET_USER_CAR_TITLE (state, title) {
    state.userCarState.userCarTitle = title
  }
};
export default mutations;
